<!--我的优惠请求之后的页面-->
<template>
  <div class="myvouchers">
    <div class="myvouchers_div">{{ money2[1] }}{{ money2[2] }}</div>
    <p class="myvouchers_p">{{ money2[3] }}</p>
    <div class="myvouchers_div">{{ money2[5][1] }}{{ money2[5][2] }}</div>
    <p class="myvouchers_p">{{ money2[5][4] }}{{money2[5][6]}}</p>
    <div class="myvouchers_div">{{ money2[6][1] }}{{ money2[6][2] }}</div>
    <p class="myvouchers_p">{{ money2[6][2] }}</p>
    <p class="myvouchers_p">{{ money2[6][4] }}</p>
    <p class="myvouchers_p">{{ money2[6][6] }}</p>
    <p class="myvouchers_p">{{ money2[6][8] }}</p>
  </div>
</template>

<script>
export default {
  name: "Myvouchers",
  data: function () {
    return {
      // 我的余额数据源
      money1: [],
      money2: [],
    };
  },
  created() {
    this.$axios("https://elm.cangdu.org/v3/profile/explain")
      .then((res) => {
        // //先通过###分割成一个数组，放入每条数据
      
        this.money1 = res.couponContent.split("###");
        this.money2 = this.money1[1].split(" ");
        this.money2.push(this.money1[2].split(" "));
        this.money2.push(this.money1[3].split(" "));

      })
      .catch((err) => console.log(err));
  },
};
</script>

<style lang="less">
.myvouchers {
  padding: 15px;
}
.myvouchers_p{
  font-size: 18px;
  margin-bottom: 10px;
}
.myvouchers_p{
  font-size: 14px;
  margin-bottom: 10px;
  color: #666;
  line-height: 25px;
}
</style>